<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%--
  Created by IntelliJ IDEA.
  User: LV
  Date: 2016/7/19
  Time: 18:22
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <%--<meta charset="UTF-8">--%>
    <%--<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">--%>
    <%--<meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=0" />--%>
    <%--<!-- 全屏 -->--%>
    <%--<meta name="apple-mobile-web-app-capable" content="yes" />--%>
    <%--<!-- 上方栏显示 -->--%>
    <%--<meta name="apple-mobile-web-app-status-bar-style" content="black" />--%>
    <%--<!-- 不自动识别号码 -->--%>
    <%--<meta name="format-detection" content="telephone=no">--%>
    <%--<link href="${ctx}/assets/public_skin/css/reset.css" rel="stylesheet">--%>
    <%--<link href="${ctx}/assets/public_skin/css/shop_style.css" rel="stylesheet">--%>
    <%--<script src="${ctx}/assets/public_skin/js/jquery-1.11.1.min.js" type="text/javascript"></script>--%>
    <%--<script src="${ctx}/assets/public_skin/js/shop.common.js" type="text/javascript"></script>--%>
    <title>商品管理</title>
</head>
<body>
<%--<header>--%>
    <%--<h1>商品管理</h1>--%>
    <%--<a href="javascript:;"></a>--%>
<%--</header>--%>
<article class="viewports">
    <div class="tab_menu">
        <div class="mt layout-box b-ffffff tac">
            <a class="box-col curr" href="${ctx}/product/productManage">全部商品</a>
            <a class="box-col" href="${ctx}/product/getProductByStatus?status=1">销售中</a>
            <a class="box-col" href="${ctx}/product/getProductByStatus?status=0">已下架</a>
        </div>
        <ul class="mc list_item c3 odr_b">
            <c:forEach items="${productList}" var="product">
            <li class="odr_t">
                <div class="layout-box p20 odr_b">
                    <div class="ith_img usernane_img140 mr20">
                        <span class="bg_span" style="background-image:url(${product.productMainImage});"></span>
                    </div>
                    <div class="box-col">
                        <h2 class="fs28 hgt2">${product.productName}</h2>
                        <div class="fs24 mt20 lh1">
                            <span class="c-cb1448">&yen;${product.salePrice}</span>
                            <span class="r ">
                                &times;${product.saleCountTotal}
                                </span>
                        </div>
                    </div>
                </div>
                <div class="plr20 tac">
                    <c:if test="${product.status==0}">
                        <span class="c6">已下架</span>
                    </c:if>
                    <c:if test="${product.status==1}">
                        <span class="c6">销售中</span>
                    </c:if>

                        <span class="r">
                            <c:if test="${product.status==0}">
                                <a class="odr2 r5 ptb5_lr15 c-cb1448" href="${ctx}/product/changeProductStatus?pid=${product.productId}&status=1">上架</a>
                            </c:if>
                            <c:if test="${product.status==1}">
                                <a class="odr2 r5 ptb5_lr15 c-cb1448" href="${ctx}/product/changeProductStatus?pid=${product.productId}&status=0">下架</a>
                            </c:if>

                            <a class="odr2 r5 ptb5_lr15 c-cb1448" href="${ctx}/product/productMoveShopCategory?pid=${product.productId}">移动分类</a>
                        </span>
                </div>
            </li>
            </c:forEach>
        </ul>
    </div>
</article>
<!--star 底下购物按钮-->
<div class="buy_height"></div>
<div class="p_fotbtn layout-box tac fs30 lh120">
    <div class="box-col b-ffffff">
        <a class="c6" href="${ctx}/shop/manageShopCategory"><i class="ico-60 ico_admin mr30"></i>分类管理</a>
    </div>
    <div class="box-col b-ffaa3b">
        <a class="cf" href="${ctx}/product/selectClassify"><i class="ico-60 ico_add mr30"></i>发布商品</a>
    </div>
</div>
<!--end 底下购物按钮-->
</body>
</html>
